package view
{
	import flash.events.MouseEvent;
	import flash.utils.getQualifiedClassName;
	
	import mx.controls.Button;
	
	import org.osflash.thunderbolt.Logger;
	import org.puremvc.as3.multicore.utilities.fabrication.patterns.mediator.FlexMediator;
	
	import view.components.CommonControlBar;

	public class CommonControlBarMediator extends FlexMediator
	{
		public static const NAME:String = getQualifiedClassName(CommonControlBarMediator);
		
		public function CommonControlBarMediator(viewComponent:Object=null)
		{
			super(NAME, viewComponent);
		}
		
		override public function onRegister():void
		{
			Logger.info(NAME+ " : onRegister()");
			
			super.onRegister();
		}
		
		public function reactToManageAccountsClick(e:MouseEvent):void
		{
			Logger.info(NAME+ " : reactToManageAccountsClick()");	
		}
		
		public function get manageAccounts():Button
		{
			return viewComponent.manageAccounts as Button;	
		}
		
		private function get app():CommonControlBar
		{
			return viewComponent as CommonControlBar;
		}
	}
}